<div id="left"></div>
<br /><br />
<div id="view-content">
   <h1>Welcome on the <span class="logo">What's up?</span> page of <?= $this->topic["userName"] ?></h1>
   <div id="user-infos">
       
        <img class="profile" src="..\images\upload/<?= $this->topic["picture"] ?>" alt="picture" width="120" height="120"/>
      Name in the real life: <?= $this->topic["name"] ?> <br>
      Current location: <?= $this->topic["location"] ?> <br>
      Said to be born on: <?= $this->topic["birthdate"] ?> <br><br>
      
      <?= $this->topic["description"] ?>
      
   </div>
   
   <h3>Timeline of <?= $this->topic["userName"] ?></h3>
   <ul id="timeline">
<?php
if (count($this->postsFromCurrentUser) > 0) {
   for ($i=0 ; $i<5 ; $i++) {
      $post = $this->postsFromCurrentUser[$i];
      echo "<li>";
      echo "<h6>Posted on ".$post["date"]."</h6>";
      echo $post["text"];
      echo "</li>";
   }
}
else {
?>
         <em>This user didn't post any message yet.</em>
<?php
}
?>
   </ul>
   
   <h3>Topics of <?= $this->topic["userName"] ?></h3>
   <ul id="topics">
<?php
if (count($this->topics) > 0) {
   foreach ($this->topics as $topic) {
      echo "<li>";
      echo "<a href=\"/WhatsUpProject/public/search/user?avatar=".
              $topic["userName"]."\">".$topic["userName"]."</a>";
      echo "</li>";
   }
}
else {
?>
      <em>This user didn't subscribe to any topic yet.</em>
<?php
}
?>
   </ul>
   
   <h3>Some of <?= $this->topic["userName"] ?>'s followers</h3>
   <ul id="subscribers">
<?php
if (count($this->subscribers) > 0) {
   foreach ($this->subscribers as $subscriber) {
      echo "<li>";
      echo "<a href=\"/WhatsUpProject/public/search/user?avatar=".
              $subscriber["userName"]."\">".$subscriber["userName"]."</a>";
      echo "</li>";
   }
}
else {
?>
               <em>No one is following this user yet.</em>
<?php
}
?>
   </ul>
   
</div>